package com.gserver.test;

import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.Channels;
import org.jboss.netty.util.HashedWheelTimer;
import org.jboss.netty.util.Timer;

import com.gserver.netty.coder.ObjectDecoder;
import com.gserver.netty.coder.ObjectEncoder;

/**
 * 
 */
public class ClientPipelineFactory implements ChannelPipelineFactory {

	Timer timer = new HashedWheelTimer();

	public ChannelPipeline getPipeline() throws Exception {
		ChannelPipeline pipeline = Channels.pipeline();
		pipeline.addLast("decoder", new ObjectDecoder());
		pipeline.addLast("encoder", new ObjectEncoder());
		pipeline.addLast("handler", new ClientHandler());
		return pipeline;

	}

}
